/**
 * 约定类型、类型定义、类型标注
 */

let firstName: string = "张三";
firstName = "里斯";

let lastName: string;
lastName = "三";

const count: number = 10;

let isDone: boolean = false;

/**
 * 类型推导、类型推断
 *    在定义变量方法对象等的时候，不标注类型，Ts能够自动推导出它的类型。
 */
let first = "里";
const last = "四"; // 字面量常量类型
let age = 18 as const;

function fn1(event: MouseEvent) {
  event.pageX;
  event.pageY;
  return 100;
}

let person = {
  name: "张三",
  age: 18,
};
